package com.yj.inventory.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yj.common.enums.InventoryType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * Copyright 2017 (C) Yunjian-VC
 * Created on : 2017/12/12
 * Author     : Unbelievable9
 **/
@Data
public class Inventory {

    @ApiModelProperty("库存ID, 更新时必填")
    private Integer id;

    @ApiModelProperty(hidden = true)
    private String user_id;

    @ApiModelProperty(value = "库存类型", required = true)
    private InventoryType type;

    @ApiModelProperty(value = "库存名称", required = true)
    private String name;

    @ApiModelProperty(value = "经度", required = true)
    private BigDecimal longitude;

    @ApiModelProperty(value = "纬度", required = true)
    private BigDecimal latitude;

    @ApiModelProperty(value = "库存吨数", required = true)
    private BigDecimal amount;

    @ApiModelProperty(value = "记录时间", required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime record_time;

    @ApiModelProperty(hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime create_time;
}
